jQuery(document).ready(function() {
    var country="";
    //new IF
    var country1=jQuery('#edit-submitted-country-of-domestic-transfer').val();
    //edit IF
    var country2=jQuery('#edit-country').val();
    //view IF
    var country3=jQuery('#language_switcher_country').val();
    //delete IF
    var country4=jQuery('input[name=language_switcher_country]').val();
    if(typeof country1 != 'undefined'){
        var country=country1.toLowerCase();
    }
    if(typeof country2 != 'undefined'){
        var country=country2.toLowerCase();
    }
    if(typeof country3 != 'undefined'){
        var country=country3.toLowerCase();
    }
    if(typeof country4 != 'undefined'){
        var country=country4.toLowerCase();
    }
    if(country!=""){
        if(country=="cn"){
            jQuery('.form-select #et').remove();
//            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
        if(country=="fr"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            //jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
        if(country=="de"||country=="at"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            //jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
        if(country=="ja"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            //jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
        if(country=="es"||country=="mx"||country=="co"||country=="ve"||country=="ar"||country=="cl"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            //jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
        if(country=="tr"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            //jQuery('.form-select #tr').remove();
        }
        //those country only show english Australia Austria Malaysia Mexico Poland Switzerland 
        if(country=="au"||country=="in"||country=="my"||country=="pl"||country=="ch"
            ||country=="pk"||country=="ru"||country=="ro"||country=="ph"||country=="id"
    ||country=="hr"||country=="sk"||country=="cz"||country=="hu"||country=="gr"
||country=="pt"||country=="ma"||country=="nl"){
            jQuery('.form-select #et').remove();
            jQuery('.form-select #zh-hans').remove();
            jQuery('.form-select #fr').remove();
            jQuery('.form-select #de').remove();
            jQuery('.form-select #ja').remove();
            jQuery('.form-select #es').remove();
            jQuery('.form-select #tr').remove();
        }
    }
})